import PropTypes from "prop-types"
import InputSelect from "./inputs/InputSelect"

const ModelerVersionPicker = ({
  versions,
  ...props
}) => {
  return <div style={{
    height: 32,
    display: 'flex',
    alignItems: 'center',
    marginLeft: 30
  }}>
    <span style={{ color: '#999', fontSize: 12 }}>版本：</span>
    <InputSelect
      style={{ width: 60 }}
      size="small"
      options={versions.map(el => ({
        value: el.version,
        label: 'v' + el.version
      }))}
      {...props}
    ></InputSelect>
  </div>
}

ModelerVersionPicker.propTypes = {
  versions: PropTypes.array.isRequired
}

export default ModelerVersionPicker
